<?php

/**
 * Backend interface language.
 *
 */
class Backend_Block_InterfaceLang extends Kernel_Block 
{
    
    /**
    * Return template data.
    * 
    * @return array
    */
    public function getData() 
    {
        $langs = array();
        
        foreach (Kernel_i18n_Structure::getBackendInterfaceLang() as $lang) {
            array_push($langs, array(
                'name' => $lang['name'], 
                'active' => $lang['code'] == Backend_Filter_Structure::get('interface_lang'), 
                'url' => array('interface_lang' => $lang['code']), 
                ));
        }
        
        return array('_interface_langs' => $langs);
    }
    
}
